using System;
using System.Collections.Generic;
using Me.Prettyprint.Hector.Api;
using Me.Prettyprint.Hector.Api.Exceptions;
using Org.Apache.Cassandra.Thrift;

namespace Me.Prettyprint.Cassandra.Service
{
	public struct KeyspaceService_Fields{
		public readonly static System.String CF_TYPE = "Type";
		public readonly static System.String CF_TYPE_STANDARD = "Standard";
		public readonly static System.String CF_TYPE_SUPER = "Super";
	}
    /// <summary>
    /// KeyspaceService classes should implement all of these methods.
    /// </summary>
	public interface KeyspaceService
	{
        Column GetColumn(byte[] key, ColumnPath cpath);
        Column GetColumn(string key, ColumnPath cpath);
        CounterColumn GetCounter(byte[] key, ColumnPath cpath);
        CounterColumn GetCounter(string key, ColumnPath cpath);
        SuperColumn GetSuperColumn(byte[] key, ColumnPath cpath);
        SuperColumn GetSuperColumn(string key, ColumnPath cpath);
        SuperColumn GetSuperColumn(byte[] key, ColumnPath cpath, bool reversed, int size);
        List<Column> GetSlice(byte[] key, ColumnParent parent, SlicePredicate predicate);
        List<Column> GetSlice(string key, ColumnParent parent, SlicePredicate predicate);
        List<CounterColumn> GetCounterSlice(byte[] key, ColumnParent cpath, SlicePredicate predicate);
        List<CounterColumn> GetCounterSlice(string key, ColumnParent cpath, SlicePredicate predicate);
        List<SuperColumn> GetSuperSlice(byte[] key, ColumnParent cpath, SlicePredicate predicate);
        List<SuperColumn> GetSuperSlice(string key, ColumnParent cpath, SlicePredicate predicate);
        List<CounterSuperColumn> GetCounterSuperSlice(byte[] key, ColumnParent cpath, SlicePredicate predicate);
        List<CounterSuperColumn> GetCounterSuperSlice(string key, ColumnParent cpath, SlicePredicate predicate);
        Dictionary<byte[], SuperColumn> MultigetSuperColumn(List<byte[]> keys, ColumnPath columnPath);
        Dictionary<byte[], SuperColumn> MultigetSuperColumn(List<byte[]> keys, ColumnPath columnPath, bool reversed, int size);
        Dictionary<byte[], List<Column>> MultigetSlice(List<byte[]> keys, ColumnParent columnParent, SlicePredicate predicate);
        Dictionary<byte[], List<CounterColumn>> MultigetCounterSlice(List<byte[]> keys, ColumnParent columnParent, SlicePredicate predicate);
        Dictionary<byte[], List<SuperColumn>> MultigetSuperSlice(List<byte[]> keys, ColumnParent columnParent, SlicePredicate predicate);
        Dictionary<byte[], List<CounterSuperColumn>> MultigetCounterSuperSlice(List<byte[]> keys, ColumnParent columnParent, SlicePredicate predicate);
        void Insert(byte[] key, ColumnParent columnParent, Column column);
        void Insert(string key, ColumnParent columnParent, Column column);
        void Insert(string key, ColumnPath columnPath, byte[] value);
        void Insert(string key, ColumnPath columnPath, byte[] value, long timestamp);
        void AddCounter(byte[] key, ColumnParent columnParent, CounterColumn counterColumn);
        void AddCounter(string key, ColumnParent columnParent, CounterColumn counterColumn);
        void BatchMutate(Dictionary<byte[], Dictionary<string, List<Mutation>>> mutationMap);
        void BatchMutate<K>(BatchMutation<K> batchMutation);
        void Remove(byte[] key, ColumnPath columnPath);
        void Remove(string key, ColumnPath columnPath);
        void Remove(byte[] key, ColumnPath columnPath, long timestamp);
        void Remove(string key, ColumnPath columnPath, long timestamp);
        void RemoveCounter(byte[] key, ColumnPath columnPath);
        void RemoveCounter(string key, ColumnPath columnPath);
        int GetCount(byte[] key, ColumnParent columnParent, SlicePredicate predicate);
        Dictionary<byte[], List<Column>> GetRangeSlices(ColumnParent columnParent, SlicePredicate predicate, KeyRange keyRange);
        Dictionary<byte[], List<CounterColumn>> GetRangeCounterSlices(ColumnParent columnParent, SlicePredicate predicate, KeyRange keyRange);
        Dictionary<byte[], List<SuperColumn>> GetSuperRangeSlices(ColumnParent columnParent, SlicePredicate predicate, KeyRange keyRange);
        Dictionary<byte[], List<CounterSuperColumn>> GetSuperRangeCounterSlices(ColumnParent columnParent, SlicePredicate predicate, KeyRange keyRange);
        Dictionary<byte[], List<Column>> GetIndexedSlices(ColumnParent columnParent, IndexClause indexClause, SlicePredicate predicate);
        Dictionary<byte[], int> MultigetCount(List<byte[]> keys, ColumnParent columnParent, SlicePredicate slicePredicate);
        HConsistencyLevel GetConsistencyLevel(OperationType operationType);
        string Name
        {
            get;
        }
        CassandraHost CassandraHost
        {
            get;
        }
    }
}